import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询商户列表
export function getShop(params) {
  return request({
    url: '/console/shop/list',
    method: 'get',
    params: params
  })
}
// 查询单个商户信息
export function getById(params) {
    return request({
      url: '/console/shop/getById',
      method: 'get',
      params: params
    })
  }

//修改商户信息
export function updateShop(data) {
  return request({
    url: '/console/shop/update',
    method: 'post',
    data: data
  })
}

// 删除商户
export function deleteShop(data) {
    return request({
      url: '/console/shop/delete',
      method: 'post',
      data: data
    })
}

//设置商户状态
export function setStatus(data) {
    return request({
      url: '/console/shop/setStatus',
      method: 'post',
      data: data
    })
  }
//生成小程序码
export function getQRCode(params) {
    return request({
      url: '/console/shop/getQRCode',
      method: 'get',
      // responseType:'blob',
      params: params
    })
  }
